package com.woniu.goodsnacos.controller;

import com.woniu.goodsnacos.entity.Goods;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/goods")
public class GoodsController {

    @GetMapping("/findById/{id}")
    public Goods findById(@PathVariable("id") Integer id){
        System.out.println(id);

        return new Goods(1001,"测试1");
    }

}
